Style and use attributes
The WSDL file can represent SOAP requests and responses in several different ways. Specifically, the style attribute can have the value "rpc" or "document" and the use attribute can have the value "encoded" or "literal".
Table 2–1 summarizes how each value affects SOAP message format.
Table 2–1: WSDL style and use attributes
|
WSDL/SOAP attribute
|
Value
|
Description
|
|
|
|
RPC — A communications style that sends request messages and response messages using a remote procedure call (RPC) model. The input message contains the name of the WSDL operation and the input parameters. The output message contains any return value and any output parameters.
|
|
|
Document — A communications style that sends and manages messages using an arbitrary XML document model that does not impose any particular communications model on the messages. Thus, there is no standard convention for whether and how messages are sent or received. The communications model (request and response, or one-way) is specified in XML Schema definitions contained within the WSDL or in a separate schema.
Note: The Progress 4GL Web services Document style always specifies a request/response schema in the WSDL.
|
|
|
|
Encoded — A message formatting scheme that uses a set of rules to encode the data in the body of the message. The message itself does not conform to a particular schema, but the rules are indicated by an encoding namespace specified in the WSDL.
Note: The encoding scheme used by the Progress 4GL Web services (and most client platforms) is SOAP encoding, a message encoding scheme defined by the SOAP standard.
|
|
|
Literal — A message formatting scheme in which the body of the message conforms to a specific XML Schema that is specified in the WSDL.
|
In practical terms, there is little difference between using RPC or Document style when exchanging request/response messages, as is typical with Web services. The most significant difference in message structure is in the choice of use, Encoded (SOAP encoding) or Literal. SOAP encoding allows for a simpler representation of complex, object-oriented data structures than is possible with Literal encoding. However, Document/Literal messages have the advantage that they can be validated by XML Schema.